///**************************************************************************************
//*
//*	Copyright (C) 2011 Brent Andrew Chua 
//*		
//*	Filename	-	Main.cpp
//*
//*	Description -	Chapter 4.
//*
//*	Comments	-	On struct, functions, pointers, refences.
//*
//**************************************************************************************/
//
//#include <iostream>
//#include <string>
//
//using namespace std;
//
//// A Sample Function
//void SayHelloWorld( void )
//{
//	cout << "Hello world" << endl;
//}
//
//// Accepting parameters
//void Sum( int num1, int num2 )
//{
//	cout << "Sum of " << num1 << " and " << num2 << " is: " << num1 + num2 << endl;
//}
//
//// Polymorphism
//int Sum2( int num1, int num2 )
//{
//	return num1 + num2;
//}
//
//// Polymorphism
////float Sum2( float num1, float num2 )
////{
////	return num1 + num2;
////}
//
//double Sum2( double num1, double num2 )
//{
//	return num1 + num2;
//}
//
//struct Player
//{
//	int life;
//	int energy;
//	string name;
//	int experience;
//	int coins;
//	string friends[100];
//	int inventory[1000];
//	bool missions[100];
//};
//
//void MakeFriends( Player player1, Player player2 )
//{
//	cout << player1.name << " and " << player2.name << " are now friends!" << endl;
//}
//
//void SwitchNames( Player player1, Player player2 )
//{
//	cout << "Switching" << endl;
//	string tempName = player1.name;
//	player1.name = player2.name;
//	player2.name = tempName;
//}
//
//void FixedSwitchNames( Player &player1, Player &player2 )
//{
//	cout << "Switching" << endl;
//	string tempName = player1.name;
//	player1.name = player2.name;
//	player2.name = tempName;
//}
//void DisplayName( Player player )
//{
//	cout << "Mighty god's name is: " << player.name << endl;
//}
//
//void SampleFunc( char chars[] )
//{
//
//}
//
//int main( void )
//{
//	char chars[100];
//	SayHelloWorld();
//	Sum( 5, 3 );
//	cout << endl << Sum2( 1, 2 );
//	cout << endl << Sum2( 1.5f, 2.0f ) << endl; // 1.5f and 2.0f implicitly upgrades to double
//
//	SampleFunc( chars[0] );
//
//	int x;
//	Player player1;
//	Player player2;
//	Player &refPlayer = player1;
//
//	player1.name = "Mark thor";
//	player1.coins = 989999;
//
//	//refPlayer;
//	//refPlayer.name = "Brent";
//
//	player2.name = "Great Puyih Khan";
//
//	MakeFriends( player1, player2 );
//
//	cout << endl << endl;
//
//	DisplayName( player1 );
//	DisplayName( player2 );
//
//	//SwitchNames( player1, player2 ); // Wrong way
//	FixedSwitchNames( player1, player2 ); // 
//
//	DisplayName( player1 );
//	DisplayName( player2 );
//
//
//	return 0;
//}